package com.xiaotu.yapi.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Mr.zhang
 * @create 2022-01-08 13:16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {

    private Integer code;

    private String message;

    private T data;

    public static <T> CommonResult sucess(T data) {
        return new CommonResult(200, "成功", data);
    }

}
